import React from 'react';
import FormRender, { connectForm } from 'form-render';
import schema from './simple';
// https://xrender.fun/form-render
// https://xrender.fun/schema-builder-online  可以配合可视化
class Demo extends React.Component {
    onFinish = (formData) => {
        console.log('formData:', formData);
    };

    render() {
        const { form } = this.props;
        return (
            <FormRender
                form={form}
                schema={schema}
                onFinish={this.onFinish}
                maxWidth={360}
                footer={true}
            />
        );
    }
}

export default connectForm(Demo);